﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Windows;

namespace Phys.UI {
	/// <summary>
	/// Interaction logic for App.xaml
	/// </summary>
	public partial class App : Application {
		private void Application_Exit(object sender, ExitEventArgs e) {
			UI.Properties.Settings.Default.Save();
			outLog.WriteLine("Application exited: " + DateTime.Now);
			errLog.WriteLine("Application exited: " + DateTime.Now);
		}
		System.IO.StreamWriter outLog = System.IO.File.AppendText("out.log");
		System.IO.StreamWriter errLog = System.IO.File.AppendText("err.log");
		private void Application_Startup(object sender, StartupEventArgs e) {
			outLog.AutoFlush = true;
			errLog.AutoFlush = true;

			Console.SetOut(outLog);
			Console.SetError(errLog);
			outLog.WriteLine("Application started: " + DateTime.Now);
			errLog.WriteLine("Application started: " + DateTime.Now);
		}
	}
}
